
<% if @is_repository_private %>
require 'hipchat/capistrano'
set :hipchat_token, "<%= @token %>"
set :hipchat_room_name, "<%= @room %>"
set :hipchat_announce, true
set :hipchat_color, 'purple'
set :hipchat_success_color, 'green'
set :hipchat_failed_color, 'red'
set :hipchat_message_format, 'text'
<% else %>
settings = YAML.load_file(File.dirname(__FILE__) + "/<%= @settinglogic_yml %>")[rails_env]
if settings["hipchat_token"].to_s.length > 0
  require 'hipchat/capistrano'
  set :hipchat_token, settings["hipchat_token"]
  set :hipchat_room_name, settings["hipchat_room"]
  set :hipchat_announce, true
  set :hipchat_color, 'purple'
  set :hipchat_success_color, 'green'
  set :hipchat_failed_color, 'red'
  set :hipchat_message_format, 'text'
end
<% end %>